Optimal. Leaf size=248 \[ -\frac {\left (4 a^2-3 b^2\right ) E\left (\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )|\frac {2 b}{a+b}\right ) \sqrt {a+b \sin (c+d x)}}{6 \left (a^2-b^2\right ) d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}+\frac {2 a F\left (\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}{3 d \sqrt {a+b \sin (c+d x)}}-\frac {\sec (c+d x) \sqrt {a+b \sin (c+d x)} \left (a b-\left (4 a^2-3 b^2\right ) \sin (c+d x)\right )}{6 \left (a^2-b^2\right ) d}+\frac {\sec ^2(c+d x) \sqrt {a+b \sin (c+d x)} \tan (c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.23, antiderivative size = 248, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {2769, 2945,
2831, 2742, 2740, 2734, 2732} \begin {gather*} -\frac {\sec (c+d x) \sqrt {a+b \sin (c+d x)} \left (a b-\left (4 a^2-3 b^2\right ) \sin (c+d x)\right )}{6 d \left (a^2-b^2\right )}-\frac {\left (4 a^2-3 b^2\right ) \sqrt {a+b \sin (c+d x)} E\left (\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{6 d \left (a^2-b^2\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}+\frac {2 a \sqrt {\frac {a+b \sin (c+d x)}{a+b}} F\left (\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{3 d \sqrt {a+b \sin (c+d x)}}+\frac {\tan (c+d x) \sec ^2(c+d x) \sqrt {a+b \sin (c+d x)}}{3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2769
Rule 2831
Rule 2945
Rubi steps
\begin {align*} \int \sec ^4(c+d x) \sqrt {a+b \sin (c+d x)} \, dx &=\frac {\sec ^2(c+d x) \sqrt {a+b \sin (c+d x)} \tan (c+d x)}{3 d}-\frac {1}{3} \int \frac {\sec ^2(c+d x) \left (-2 a-\frac {3}{2} b \sin (c+d x)\right )}{\sqrt {a+b \sin (c+d x)}} \, dx\\ &=-\frac {\sec (c+d x) \sqrt {a+b \sin (c+d x)} \left (a b-\left (4 a^2-3 b^2\right ) \sin (c+d x)\right )}{6 \left (a^2-b^2\right ) d}+\frac {\sec ^2(c+d x) \sqrt {a+b \sin (c+d x)} \tan (c+d x)}{3 d}+\frac {\int \frac {-\frac {a b^2}{4}-\frac {1}{4} b \left (4 a^2-3 b^2\right ) \sin (c+d x)}{\sqrt {a+b \sin (c+d x)}} \, dx}{3 \left (a^2-b^2\right )}\\ &=-\frac {\sec (c+d x) \sqrt {a+b \sin (c+d x)} \left (a b-\left (4 a^2-3 b^2\right ) \sin (c+d x)\right )}{6 \left (a^2-b^2\right ) d}+\frac {\sec ^2(c+d x) \sqrt {a+b \sin (c+d x)} \tan (c+d x)}{3 d}+\frac {1}{3} a \int \frac {1}{\sqrt {a+b \sin (c+d x)}} \, dx-\frac {\left (4 a^2-3 b^2\right ) \int \sqrt {a+b \sin (c+d x)} \, dx}{12 \left (a^2-b^2\right )}\\ &=-\frac {\sec (c+d x) \sqrt {a+b \sin (c+d x)} \left (a b-\left (4 a^2-3 b^2\right ) \sin (c+d x)\right )}{6 \left (a^2-b^2\right ) d}+\frac {\sec ^2(c+d x) \sqrt {a+b \sin (c+d x)} \tan (c+d x)}{3 d}-\frac {\left (\left (4 a^2-3 b^2\right ) \sqrt {a+b \sin (c+d x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \sin (c+d x)}{a+b}} \, dx}{12 \left (a^2-b^2\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}+\frac {\left (a \sqrt {\frac {a+b \sin (c+d x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \sin (c+d x)}{a+b}}} \, dx}{3 \sqrt {a+b \sin (c+d x)}}\\ &=-\frac {\left (4 a^2-3 b^2\right ) E\left (\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )|\frac {2 b}{a+b}\right ) \sqrt {a+b \sin (c+d x)}}{6 \left (a^2-b^2\right ) d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}+\frac {2 a F\left (\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}{3 d \sqrt {a+b \sin (c+d x)}}-\frac {\sec (c+d x) \sqrt {a+b \sin (c+d x)} \left (a b-\left (4 a^2-3 b^2\right ) \sin (c+d x)\right )}{6 \left (a^2-b^2\right ) d}+\frac {\sec ^2(c+d x) \sqrt {a+b \sin (c+d x)} \tan (c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 3.25, size = 270, normalized size = 1.09 \begin {gather*} \frac {\left (4 a^3+4 a^2 b-3 a b^2-3 b^3\right ) E\left (\frac {1}{4} (-2 c+\pi -2 d x)|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}}-4 a \left (a^2-b^2\right ) F\left (\frac {1}{4} (-2 c+\pi -2 d x)|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}}+\frac {1}{8} \sec ^3(c+d x) \left (8 a^2 b-11 b^3+\left (-12 a^2 b+8 b^3\right ) \cos (2 (c+d x))+\left (-4 a^2 b+3 b^3\right ) \cos (4 (c+d x))+24 a^3 \sin (c+d x)-24 a b^2 \sin (c+d x)+8 a^3 \sin (3 (c+d x))-8 a b^2 \sin (3 (c+d x))\right )}{6 (a-b) (a+b) d \sqrt {a+b \sin (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1260\) vs.
\(2(294)=588\).
time = 2.27, size = 1261, normalized size = 5.08
method | result | size |
default | \(\text {Expression too large to display}\) | \(1261\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.13, size = 526, normalized size = 2.12 \begin {gather*} \frac {\sqrt {2} {\left (8 \, a^{3} - 9 \, a b^{2}\right )} \sqrt {i \, b} \cos \left (d x + c\right )^{3} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 i \, a^{3} - 9 i \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) - 3 i \, b \sin \left (d x + c\right ) - 2 i \, a}{3 \, b}\right ) + \sqrt {2} {\left (8 \, a^{3} - 9 \, a b^{2}\right )} \sqrt {-i \, b} \cos \left (d x + c\right )^{3} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (-8 i \, a^{3} + 9 i \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) + 3 i \, b \sin \left (d x + c\right ) + 2 i \, a}{3 \, b}\right ) + 3 \, \sqrt {2} {\left (4 i \, a^{2} b - 3 i \, b^{3}\right )} \sqrt {i \, b} \cos \left (d x + c\right )^{3} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 i \, a^{3} - 9 i \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 i \, a^{3} - 9 i \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) - 3 i \, b \sin \left (d x + c\right ) - 2 i \, a}{3 \, b}\right )\right ) + 3 \, \sqrt {2} {\left (-4 i \, a^{2} b + 3 i \, b^{3}\right )} \sqrt {-i \, b} \cos \left (d x + c\right )^{3} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (-8 i \, a^{3} + 9 i \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (-8 i \, a^{3} + 9 i \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) + 3 i \, b \sin \left (d x + c\right ) + 2 i \, a}{3 \, b}\right )\right ) - 6 \, {\left (a b^{2} \cos \left (d x + c\right )^{2} - {\left (2 \, a^{2} b - 2 \, b^{3} + {\left (4 \, a^{2} b - 3 \, b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )\right )} \sqrt {b \sin \left (d x + c\right ) + a}}{36 \, {\left (a^{2} b - b^{3}\right )} d \cos \left (d x + c\right )^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a + b \sin {\left (c + d x \right )}} \sec ^{4}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\sqrt {a+b\,\sin \left (c+d\,x\right )}}{{\cos \left (c+d\,x\right )}^4} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________